<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>Window.pb</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<pre><font face="Courier New, Courier, mono"size="2"><font color="#006666">;
</font><font color="#006666">; ------------------------------------------------------------
</font><font color="#006666">;
</font><font color="#006666">;   PureBasic - Window example file
</font><font color="#006666">;
</font><font color="#006666">;    (c) Fantaisie Software
</font><font color="#006666">;
</font><font color="#006666">; ------------------------------------------------------------
</font><font color="#006666">;
</font>
<font color="#006666">;
</font><font color="#006666">; Open a window, and do some stuff with it...
</font><font color="#006666">;
</font>
<b><font color="#006666">If</font></b> <font color="#006666">OpenWindow</font>(0, 100, 200, 195, 260, "PureBasic Window", <font color="#924B72">#PB_Window_SystemMenu</font> | <font color="#924B72">#PB_Window_MinimizeGadget</font> | <font color="#924B72">#PB_Window_MaximizeGadget</font>)

<font color="#006666">  MessageRequester</font>("Information", "Click to move the Window", 0)
<font color="#006666">  ResizeWindow</font>(0, 200, 200, <font color="#924B72">#PB_Ignore</font>, <font color="#924B72">#PB_Ignore</font>)   <font color="#006666">; Move the window to the coordinate 200,200
</font>  
<font color="#006666">  MessageRequester</font>("Information", "Click to resize the Window", 0)
<font color="#006666">  ResizeWindow</font>(0, <font color="#924B72">#PB_Ignore</font>, <font color="#924B72">#PB_Ignore</font>, 320, 200) <font color="#006666">; Resize the window to 320,200
</font>  
  <font color="#006666">;
</font>  <font color="#006666">; This is the 'event loop'. All the user actions are processed here.
</font>  <font color="#006666">; It's very easy to understand: when an action occurs, the Event
</font>  <font color="#006666">; isn't 0 and we just have to see what have happened...
</font>  <font color="#006666">;
</font>
  <b><font color="#006666">Repeat</font></b>
    Event =<font color="#006666"> WaitWindowEvent</font>()

    <b><font color="#006666">If</font></b> Event = <font color="#924B72">#PB_Event_CloseWindow</font>  <font color="#006666">; If the user has pressed on the close button
</font>      Quit = 1
    <b><font color="#006666">EndIf</font></b>

  <b><font color="#006666">Until</font></b> Quit = 1
  
<b><font color="#006666">EndIf</font></b>

<b><font color="#006666">End</font></b>   <font color="#006666">; All the opened windows are closed automatically by PureBasic
</font></font></pre>
</body></html>
